// Sound info for Minidalek version 37 and up -  
// many functions also work in earlier versions                        5/08/2026
//***************************************************************************************

// The whole idea behind the 10 settings folder on the SD card is to let you make changes 
// without having to upload a new sketch each time.
//
// The 10-setting operation chooses settings by playing and checking for existence of audio tracks.
// This means it will add time to the boot-up procedure.
//
// You could have a few SD cards with different playlists, carpet vs hard floor,
// different controller MAC, etc
//
// This also eliminates the need jumpers and frees I/O pins for other features
//        
//***************************************************************************************




//***************************************************************************************

    // TO ENABLE SPEED ADJUST POT:
    // Create folder named "10-settings" on your SD card(from the DF-Player)
    //
    // Place an MP3 with a name starting with "100-speedPOT". 
    // You can add to end of this name if desired



    // TO ENABLE SPEED ADJUST WITHOUT A POT: 
    // Create folder named "10-settings" on your SD card(from the DF-Player)
    //
    // Place an MP3 with a name starting with "101-speedPICK". 
    // You can add to end of this name if desired
    // 100-speedpot must not exist (rename it to x100-speedpot)
    //
    // Now name another MP3 with a name between 050 and 099 to indicate your speed setting.
    // There may already be a file named  "x060-speed has been set.mp3" that you can remove
    // the "x" and change the 3 digits to your desired speed adjust setting.
   


    // TO ENABLE External XY160d Motor drive for larger robots : 
    // (normally not needed...some of us are not normal)
    // Some motor drivers like the XY-160d require IN1 and IN2 to be set to 00 for braking.
    // The TB6612FNG uses 00 for stop and 11 for brake. We dont use brakes on the minidalek.
    //
    // Place an MP3 with a name starting with "102-" in the folder named "10-settings" 
    // on your SD card (from the DF-Player).
     // There may already be a file named  "x102-XY160.mp3" that you can remove
    // the "x" from.
 
   /* Settings folder named  "10-settings"  contains MP3 files
   000 - 009 spoken numbers ZERO through NINE
   010 - spoken POINT
   011 - 017 spoken letters A through G
   018 - spoken DEFAULT VALUE HAS BEEN SET
   020 - spoken MINIDALEK VERSION


   To use an alternate MAC address for a PS3 controller (version 39 and up)
   ------------------------------------------------------------------------
   If a MP3 filename starting with 030 does not exist in the 11-setting folder,
   your MAC will default to the address hard-coded in the sketch.
   Use sixaccess pairing tool software to read or set the mac on your controller.
  
   030-Enable_SD_mac.mp3
   031-mac31.mp3
   032-mac32.mp3
   033-mac33.mp3

mac31  mac32   mac33 
  *                   00:7F:DA:BB:AD:00
         *            00:7F:DE:AF:D0:0D
  *      *            00:7F:D0:DA:D0:DA
                 *    00:7F:BE:EB:EE:08
         *       *    00:7F:BE:EF:F0:0D
  *              *    00:7F:D0:BE:DO:BE
  *      *       *    00:7F:DA:D8:F0:0D



   If your dalek stalls while pivoting (turning in place)  or pivots too fast:
   036 - enable pivot pick based on existing filename from 037 to 049 
   037 - 049 pivot pick setting
   set pivot speed from 037-049 (otherwise default to .94)   pivotAdjust = (pivotPick+1) * .02 
   037 = .76   
   038 = .78   
   039 = .80
   040 = .82
   041 = .84
   042 = .86
   043 = .88
   044 = .90
   045 = .92
   046 = .94
   047 = .96   
   048 = .98   
   049 = 1.0
   


   050 - 099  speed pick setting
   100 - speed adjust with pot
   101 - enable speed pick without pot based on existing filename from 050 to 099
   
   102 - enable XY160 motor driver

   106 - enable "servo nudge" mode - Dpad right and left rotate dome 1 step per click
   the default is servoNudge off - servo moves as long as you press the button

   250 - This plays when startup is complete 

   */


/*
DF Player Mini info:

1 .The default  folders are  named  as "00", "11", “99” in  this  way. It is
made to support maximum 100 folders and maximum 255 tracks in each folder.
Tracks are named "001" through "255" and may be .mp3 or .wav

2. For example, to specify and play “100-filename.mp3” in the folder "01", 
     send the command 7E FF 06 0F 00 01 64 EF  
     or in decimal 126,255,6,15,0,1,100,239
  MSB: 6th byte represents the name of the folder, supports 99 folders from 00-99
  LSB: 7th byte represents the track, supports 255 tracks from 0x01 to 0xFF

3. You must specify both the folder and the file name to target a track. 
   This feature supports MP3 and WAV audio formats.
*/


//sound info for sketch version 29 and higher
//
// All audio files are stored on the Micro SD card inserted in the DFPlayer Mini module
// Sound files can be either MP3 or WAV files
//
// Sounds are stored in folder named 00 (you can append to name: 00-sound files  or anything after the 00)
//
// Sound files must be named starting with 3 digits from 001-255 and placed in 00 folder
//   example:  005-exterminate.mp3
//
//
//
// there are 4 audio modes (for now)
//
// servo mode - down, X button and PS button (just a few sounds - least annoying) 
// dpad mode - right, left, down, X and ps button (many sounds - beast mode!)
// ps mode - X, down, ps button  (some sounds - OK for kids)
// r2d2 mode - enable this by holding Button1 while booting or install jumper by Button1
//
//
// press up arrow 12 times to enable Dpad key sounds and disable servo mode- DONT TELL THE KIDS
// (up arrow 12 more times returns to servo mode from Dpad mode)
//
//   right - cycles through 15 sounds named (201-215 if dpad*) (170 if PSmode*)
//   left  - (replay right arrow sound if dpad*) (175 if PSmode*)
//   
//   up    - plays sound named (216 if dpad)
//           works 3 times until you press another button
//
//   down  - plays sound named (220 if servo*) (221-222 if dpad*) (223 if PS*) 
//           works once until you press another button

//
// press down arrow 12 times to enable round PlayStation button(PSmode)- DONT TELL THE KIDS
// (down arrow 12 more times returns to servo mode from PSmode)
//
//   PS    - cycles through sounds (224 if servo) (225-229 if PSmode*) (230-250 if dpad) ear lights
//           (sound 011 if r2d2)
//
//   X     - (sound 140-143 if servo*) (sound 150-159 if dpad*) (sound 160-164 if PSmode*) - gun light 
//           (sound 038-050 if r2d2*)
//
// 012 - Red circle button (r2d2 mode gun)	
// 013 - Red circle button (machine gun)
// 015 - Trigger button (Pew gun)
// 016 - Trigger button (r2d2 Pew gun)
// 008 - L1 button (r2d2 mode)its a trap (cycle through 008-010)
// 005 - L1 button (exterminate)
// 190 - dpadMode announcement
// 191 - psMode announcement
// 192 - servoMode announcement
// 193 - dalekMode announcement
// 194 - r2d2Mode announcement
// 195 - Adjustable speed announcement
//
//        * ignore the asterisk
